package server.business.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import server.business.pojo.BloodDispenseVo;
import server.business.pojo.BloodTestReview;
import server.business.pojo.BloodTestVo;
import server.main.config.cache.MybatisPlusRedisCache;
import server.business.pojo.BloodDispenseReview;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author Galaxy
* @description 针对表【blood_dispense_review】的数据库操作Mapper
* @createDate 2022-11-08 12:46:23
* @Entity server.business.pojo.BloodDispenseReview
*/
@Mapper
//@CacheNamespace(implementation = MybatisPlusRedisCache.class)
public interface BloodDispenseReviewMapper extends BaseMapper<BloodDispenseReview> {
    /**
     * 根据blood_dispense_id查询
     * @param bloodDispenseId
     * @return
     */
    @Select("select * from blood_dispense_review where blood_dispense_id=#{bloodDispenseId}")
    BloodTestReview selectByBloodDispenseId(Long bloodDispenseId);

    /**
     * 分页查询
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<BloodDispenseVo> selectBloodDispenseReviewByPage(Page<BloodDispenseVo> page,
                                                           @Param(Constants.WRAPPER) QueryWrapper<BloodDispenseVo> queryWrapper);

    List<BloodDispenseReview> selectBloodDispenseReviewExcel(@Param(Constants.WRAPPER) QueryWrapper<BloodDispenseVo> queryWrapper);
}




